package demon1;

public class BookList {
    private Book[] books=new Book[10];
    private int useSize;
    public  BookList(){
        books[0]=new Book("人间值得","未知",30,"哲理");
        books[1]=new Book("西游记","罗贯中",40,"哲理");
        books[2]=new Book("红楼梦","曹雪芹",45,"哲理");
        this.useSize=3;
    }

    public Book getBooks(int pos) {
        return books[pos];
    }
    public void setBooks(int pos,Book book){
        books[pos]=book;

    }
    public void setBooks(Book[] books) {
        this.books = books;
    }

    public int getUseSize() {
        return useSize;
    }

    public boolean isFull(){
        if(this.useSize==books.length){
            return true;
        }
        return false;
    }
    public void setUseSize(int useSize) {
        this.useSize = useSize;
    }
}
